"""
@file: good.py
@author: yangsiting
@data: 2021/04/25
@desc:
"""
from .base import ma
from models.goods import Goods_info,Goods_detail


class GoodsSchema(ma.Schema):
    class Meta:
        model = Goods_info
        fields = ('goods_id','goods_name','goods_img','goods_price')


class GoodsDetailSchema(ma.Schema):
    class Meta:
        model = Goods_detail
        fields = ('goods_id','goods_detail')

goods_schema = GoodsSchema(many=True)
good_schema = GoodsSchema()
goods_detail_schema = GoodsDetailSchema(many=True)
good_detail_schema = GoodsDetailSchema()